package day05;

import java.util.Arrays;

public class homework5_2 {
    public static void main(String[] args) {
        int[] arr= new int[20];
        for(int i =0;i< arr.length;i++)
        {
            arr[i]=(int)(Math.random()*100+1);
            System.out.print(arr[i]+"\t");
        }
        System.out.println("\n排序后：\n");
        Arrays.sort(arr);
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+"\t");
        }
        System.out.println("\n倒序输出：\n");
        for(int i= arr.length-1;i>=0;i--){
            System.out.print(arr[i]+"\t");
        }
    }
}
